package cn.itsource.api.openfeign;

import cn.itsource.api.fallback.loginFallbackFactory;

import cn.itsource.constants.Constants;
import cn.itsource.pojo.ro.LoginRo;
import cn.itsource.result.JSONResult;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

//因为需要用这个api去调用uaa的login登录接口 所以这个就是用来调用的
@FeignClient(value = Constants.Remote.SERVICE_UAA,fallbackFactory = loginFallbackFactory.class)
public interface ILoginOpenfeignClient {

    @PostMapping(Constants.Remote.PREFIX_LOGIN_REMOTE)
    public JSONResult createLogin(@RequestBody @Valid LoginRo login);

}
